package com.jiao.testdemo.pattern.command;


/**
 * TODO(文件概要)
 *
 * <p> TODO(具体描述信息,可以不填)
 *
 * @author meetsocial
 * @version V1.0
 * @className: ConcreteCommand
 * @date 2024/11/15 10:39
 */
public class ConcreteCommand implements Command{

    private Receiver receiver;

    public ConcreteCommand(Receiver receiver) {
        this.receiver = receiver;
    }

    @Override
    public void execute() {
        receiver.action();  // 将请求委托给接收者
    }
}
